<?php 
	$con = mysql_connect("localhost", "root", "root");
	if (!$con) {
	    die("couldn't connect " . mysql_error());
	}
	mysql_select_db("jianglaifarm", $con);
	$result = mysql_query("select * from plant");
	echo "<table>";
	echo "<tr>";
	echo "<th>序号</th>";
	echo "<th>植物名称</th>";
    echo "<th>等级</th>";
    echo "<th>经验</th>";
    echo "<th>果实产量</th>";
    echo "<th>果实价格</th>";
    echo "<th>种子价格</th>";
    echo "<th>成熟时间</th>";
    echo "</tr>";
    $index = 1;
	while($row = mysql_fetch_array($result))
	{
		echo "<tr>";
		echo "<td>" . $index . "</td>";
		echo "<td>". $row['NAME'] ."</td>";
		echo "<td>". $row['LEVEL'] ."</td>";
		echo "<td>". $row['EXP'] ."</td>";
		echo "<td>". $row['FRUIT_NUM'] ."</td>";
		echo "<td>". $row['FRUIT_PRICE'] ."</td>";
		echo "<td>". $row['SEED_PRICE'] ."</td>";
		echo "<td>". $row['RIPE_TIME'] ."</td>";
		echo "</tr>";
		$index++;
	}
	mysql_close($con)

?>

<a href="plantAdd.html"/>添加植物</a>&nbsp;<a href="adminMain.php"/>返回首页</a>